package com.zabra.zl.ui.detalsdeal;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.zabra.zl.R;
import com.zabra.zl.base.BaseActivity;
import com.zabra.zl.ui.bargain.BargainActivity;
import com.zabra.zl.ui.clear.ClearActivity;
import com.zabra.zl.ui.entrust.EntrustActivity;
import com.zabra.zl.ui.inputpwd.InputPwdActivity;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * 交易明细
 */
public class DetailsDealActivity extends BaseActivity {

    @BindView(R.id.back)
    LinearLayout back;
    @BindView(R.id.tv_title)
    TextView tvTitle;
    @BindView(R.id.rl_entrust)
    RelativeLayout rlEntrust;
    @BindView(R.id.rl_bargain)
    RelativeLayout rlBargain;
    @BindView(R.id.rl_clear)
    RelativeLayout rlClear;
    private int orderId;
    private Bundle bundle=new Bundle();
    @Override
    public int getLayoutId() {
        return R.layout.activity_details_deal;
    }

    @Override
    public void initView() {
        tvTitle.setText("交易明细");
        orderId=getIntent().getExtras().getInt("orderid");
    }


    @OnClick({R.id.back, R.id.rl_entrust, R.id.rl_bargain, R.id.rl_clear})
    public void onViewClicked(View view) {
        switch (view.getId()) {
            case R.id.back:
                finish();
                break;
            case R.id.rl_entrust:
                //委托查询
                bundle.putInt("orderid",orderId);
                toClass1(this,EntrustActivity.class,bundle);
                break;
            case R.id.rl_bargain:
                //成交查询
                bundle.putInt("orderid",orderId);
                toClass1(this,BargainActivity.class,bundle);
                break;
            case R.id.rl_clear:
                //清空查询
                bundle.putInt("orderid",orderId);
                toClass(this,ClearActivity.class,bundle);
                break;
        }
    }
}
